package me.aurora.app.rest.system;

import me.aurora.domain.User;
import me.aurora.service.RoleService;
import org.apache.shiro.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;


/**
 * @author 郑杰
 * @date 2018/08/23 17:25:12
 */
@RestController
@RequestMapping("role")
public class RoleController {

    @Autowired
    private RoleService roleService;


    @GetMapping(value = "/getAllRole")
    public Object getAllRole(){
        List<Map<String, Object>> mapList = roleService.buildRoleTree(roleService.getAllRole());
        return mapList;
    }
}
